package day20.tarena.io;
import java.io.FileOutputStream;
import java.io.RandomAccessFile;
public class TestRadom {
	public static void main(String[] args) throws Exception{
		RandomAccessFile raf1 = new RandomAccessFile("../../wtmpx","r");
	//	RandomAccessFile raf2 = new RandomAccessFile("../../copyqq.txt","rw");
		FileOutputStream fos = new FileOutputStream("../../LK");
		byte[] b= new byte[4];
		raf1.skipBytes(68);
			int num = raf1.read(b);
			//raf1.readShort();
			 fos.write(b,raf1.readShort(),4);
		
		//raf1.read(b);
		String ss = raf1.readLine();
		ss.trim();
		System.out.println();
	//	raf2.seek(72);  //seek将指针移动到目标文件的最后位，这样就可以实现追加了
		raf1.close();
		fos.close();
	//	raf2.close();
	}

}
